package com.matt.docpro.service;

import com.matt.docpro.mapper.ClinicMapper;
import com.matt.docpro.mapper.DoctorMapper;
import com.matt.docpro.model.Clinic;
import com.matt.docpro.model.Doctor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * AppointmentService
 * Created by on 2024/02/20.
 */
@Service
public class ClinicService {

    @Autowired
    ClinicMapper clinicMapper;

    public List<Clinic> getAll() {
        return clinicMapper.getAll();
    }

    public Clinic getById(String id) {
        return clinicMapper.getById(id);
    }

    public void update(Clinic clinic) {
        clinicMapper.update(clinic);
    }

    public void insert(Clinic clinic) {
        clinicMapper.insert(clinic);
    }

    public void delete(String id) {
        clinicMapper.deleteById(id);
    }

}
